package view;

import javax.faces.event.ActionEvent;

import oracle.adf.view.rich.component.rich.layout.RichPanelSpringboard;

public class SpringPanelMB {
    private RichPanelSpringboard springPanel;
    private String mode ="grid";
    public SpringPanelMB() {
    }

    public void setSpringPanel(RichPanelSpringboard springPanel) {
        this.springPanel = springPanel;
    }

    public RichPanelSpringboard getSpringPanel() {
        return springPanel;
    }

    public void changeMode(ActionEvent actionEvent) {
        // Add event code here...       
        mode =  springPanel.getDisplayMode().equals("grid") ? "strip" : "grid";
        springPanel.setDisplayMode(mode);
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public String getMode() {
        return mode;
    }
}
